﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using HSHLogicLayer.DataWS;
using HSHLogicLayer.AuthWS;
using HSHLogicLayer;


namespace TaskVision
{
    public partial class ManageRakazim : Form
    {
        public ManageRakazim()
        {
            InitializeComponent();
        }

        private void ManageRakazim_Load(object sender, EventArgs e)
        {/*
            DSRakazim ds = new DSRakazim();
            ds = (DSRakazim)DataLayerSingleton.Instance().GetAllRakazim().DataSet;
            dataGridView1.DataSource = ds.GetAllRakazim;
            for (int i = 0; i < dataGridView1.Columns.Count; i++)
            {
                dataGridView1.Columns[i].Visible = false;
            }
            dataGridView1.Columns["FirstName"].HeaderText = "שם פרטי";
            dataGridView1.Columns["LastName"].HeaderText = "שם משפחה";
            dataGridView1.Columns["CityName"].HeaderText = "יישוב";
            dataGridView1.Columns["FirstName"].Visible = true;
            dataGridView1.Columns["LastName"].Visible = true;
            dataGridView1.Columns["CityName"].Visible = true;
            dataGridView1.Refresh();*/
        }

        private void BtnClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void BtnEdit_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count == 1)
            {
                int ID = (int)dataGridView1.SelectedRows[0].Cells["ID"].Value;
                ManageRakaz RakazForm = new ManageRakaz(ID);
            }
            else
            {
                HebMessageBox.Show("please choose one entry");
            }
            
        }
    }
}
